package com.gill.controller;

import com.gill.service.ConsumerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @Autowired
    private ConsumerService consumerService;

    @RequestMapping(value = "/rest/sayhello")
    public String sayHelloByRest(String message){

        return consumerService.sayHelloByRest(message);
    }

    @RequestMapping(value = "/eureka/sayhello")
    public String sayHelloByEureka(String message){

        return consumerService.sayHelloByEureka(message);
    }

    @RequestMapping(value = "/lb/rest/sayhello")
    public String sayHelloByLoadBalance(String message){

        return consumerService.sayHelloByLoadBalance(message);
    }

}
